.box{
    display:flex;
}

.clear{
    margin: 0;
    padding: 0;
}

body{
    margin: 0;
    background: white;
    color: #3c3c3c;
}

a, a:visited, a:hover{
    color:#3c3c3c;
    text-decoration:none;
}

header{
    background-color: #f8f8f8;
}

main{
    border-top: 1px solid #ddd;
}

footer{
    border-top: 1px solid #ddd;
    background-color: #2a2a2a;
}

.row{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.5rem;
}

.container{
    width: 100%;
    max-width: 900px;
    padding: 0;
    margin: 0;
    flex-direction: column;
}

#site-info{
    padding: 0.5em 0;
    align-items: flex-end;
}

#site-info a:first-child {
    font-size: 2rem;
}

#site-info small {
    padding: 2px;
}

#navbar{
    flex-flow: wrap;
}

#navbar a{
    color: #3c3c3c;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 3px solid #f8f8f8;
    margin-right: 1.5em;
}

#navbar a:hover{
    border-bottom: 3px solid #3e7e9e;
}

#navbar form {
    border: 1px solid #c3c3c3;
    padding: 0 0.5rem;
    margin: 0.3rem 0;
    margin-left: auto;
    background-color: white;
}

#navbar form input {
    border: 0;
}

#navbar form button {
    border: 0;
    padding: 0 0.25rem;
    background-color: white;
}

#navbar form button:hover {
    background-color: #eee;
}

#expand, #expand-toggle, #close {
    display: none;
}

@media screen and (max-width:600px){
    #top-nav {
        height: 0;
    }

    #expand {
        margin-left: auto; 
        display: block;
        padding: 0.3rem 0.6rem;
        background-color: white;
        border: 1px solid #ddd;
        font-size: 1.2rem;
    }
    
    #close {
        position: absolute;
        top: 0.5rem;
        right: 1rem;
        display: block;
    }

    #navbar {
        visibility: collapse;
        position: relative;
        padding: 1em;
        border: 2px solid #ddd;
        background-color: white;
        display: flex;
        flex-direction: column;
    }
    
    #navbar form {
        margin: 0.5rem auto 0 0;
    }

    #expand-toggle:checked ~ #navbar{
        visibility: visible;
    }
    
    #expand-toggle:checked ~ #close{
        visibility: visible;
    }
}

.sidebar{
    margin: 1em 0;
    padding: 0;
    border:1px solid #ddd;
    flex-wrap: wrap;
}

.sidebar div{
    margin: 2px; 
    flex:auto;
}

.sidebar h3{
    margin:0;
    padding:3px 0.5em;
    background-color: #eee;
}

.sidebar ol{
    margin:0;
    padding-left:1em;
}

.sidebar ol li{
    margin: 0.5em;;
    padding: 0;
    border-bottom: 1px dashed #bbb;
}
.sidebar ol li a{
    color: #3c3c3c;
}

.post{
    margin:0;
    padding:0;
}
.post .post-title{
    margin:0.5rem 0;
    padding: 0;
}
.post .post-title a{
    color:#3c3c3c;
}
.post .post-meta{
    list-style:none;
    margin:0.5rem 0;
    padding:0;
    font-size:0.8em;
    flex-wrap:wrap;
}
.post .post-meta li{
    color:#b6b6b6;
    padding-right:0.5em;
}
.post .post-meta li a{
    color:#b6b6b6;
}

.post .post-content{
    line-height:1.5;
    counter-reset: step;
    counter-increment: step 0;
}
.post .post-content p{
    text-indent: 2em;
}
.post .post-content h3{
    margin:1em 0;
    padding: 0.5em 0;
    font-size: 1.2em;
    border-bottom:2px solid #3c3c3c;
}
.post .post-content h3::before{
    content: counter(step)'. ';
    counter-increment: step;
}
.post .post-content pre{
    overflow:auto;
    max-height:840px;
    border:8px solid #e5e5e5;
    background-color:#fcf6e3;
}
.post .post-content pre code{
    color:#3c3c3c;
    font-family:Menlo,Monaco,Consolas,"Lucida Console","Courier New",monospace;
}
.post .post-content code{
    color:#B94A48;
}
.post .post-content blockquote{
    margin:1em 0;
    padding-left:1.5em;
    border-left:4px solid #eee;
    color:#3c3c3c;
}
.post .post-content img{
    max-width:100%;
    display:block;
    margin-left:auto;
    margin-right:auto;
}
.post .post-content table{
    border:1px solid #ddd;width:100%;
}
.post .post-content table th,.post .post-content table td{
    padding:5px 10px;border:1px solid #eee;
}
.post .post-content table th{
    background:#eee;
}

.post .tags{
    list-style:none;
    padding:0;
    margin:1em 0;
}

.post .tags li{
    padding-right:0.5em;
}

.post .tags li a{
    color:white;
    background-color: #6C757D;
    padding: 3px;
    border-radius:3px;
    font-size: 0.8em;
}

.post .tags li a::before{
    content: '#';
}

.post-near{
    list-style:none;
    padding: 0.5em;
    margin: 0;
    border-top: 2px solid #3c3c3c;
    border-bottom: 2px solid #3c3c3c;
}

.post-near li{
    line-height: 1.5;
}

.post-near li a{
    color: #3c3c3c;
}

#archive-title{
    font-weight: bold;
    text-align: center;
    margin: 0.5em 0;
}
#post-list{
    margin:0.5em 0;
    padding:0;
    list-style:none;
}
#post-list li:first-child{
    border-top:1px solid #ddd;
}
#post-list li{
    border:1px solid #ddd;
    border-top: 0;
    font-size:1.1em;
    line-height:1.5;
    padding:0.5em;
}
#post-list li:hover{
    background-color: #eee;
}
#post-list li a{
    width: 100%;
    color:#3c3c3c;
}

#end{
    color: #e5e5e5;
    margin: 0.5em 0;
    align-items: center;
    justify-content: center;
    flex-flow: wrap;
}
#end a{
    color: #939393;
}
